<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>18.2 v-for 指令</title>

	<style>
		input[type="text"] {
			height: 30px;
			width: 300px;
			margin-bottom: 10px;
			border-radius: 5px;
			padding: 2px;
			font-size: 16px;

		}
	</style>
</head>

<body>


	<div id="app">


		<!-- 遍历list ,里面是对象  -->
		<ul>
			<!-- 加上条件判断  -->
			<li v-for="fruit in fruits">{{fruit.name}}:
				${{ fruit.discount ? fruit.price * fruit.discount : fruit.price}}</li>
		</ul>



	</div>


	<script src="../lib/vue.js"></script>
	<script src="js/main.js"></script>

</body>

</html>